<template>
  <div>
    <a-row class="select-date-line">
      <a-range-picker @change="onChange" />
      <a-button @click="clickSubmit" class="submit-btn" type="primary">
        筛选
      </a-button>
    </a-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      itemDate: [],
    };
  },
  methods: {
    onChange(date, dateString) {
      // console.log(date, dateString);
      this.itemDate[0] = dateString[0] + ' 00:00:00';
      this.itemDate[1] = dateString[1] + ' 23:59:59';
      console.log(this.itemDate);
      // 起始时间00 当前时间 23:59
    },
    clickSubmit() {
      this.$emit('saveNum', this.itemDate);
    },
  },
};
</script>

<style lang="less" scoped>
.select-date-line {
  padding: 10px 0 20px 0;
  .submit-btn {
    margin-left: 16px;
  }
}
</style>
